package com.yanqu.road.entity.log.feast;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.activity.feast.data.FeastEquipmentData;
import com.yanqu.road.entity.log.ServerBaseLog;
import com.yanqu.road.entity.log.maidian.BaseLogEntity;

import java.util.Date;
import java.util.List;
import java.util.Map;

@FieldTypeAnnotation(tableName = "t_l_ck_feast_power_val", desc = "山河乐宴-才力", autoSave = true, dataUpload = true, eventName = "shfete_abichange", uploadCk = true)
public class LogFeastPowerVal extends ServerBaseLog {

    @FieldTypeAnnotation(desc = "用户ID", isIndex = true)
    private long userId;
    @FieldTypeAnnotation(desc = "活动ID", isIndex = true, dataAttribute = "activityid")
    private int activityId;
    @FieldTypeAnnotation(desc = "类型，1境界提升，2更换法宝", dataAttribute = "shfete_abitype")
    private int type;
    @FieldTypeAnnotation(desc = "变化数量", dataAttribute = "shfete_abinum")
    private long changeCount;
    @FieldTypeAnnotation(desc = "变化后最新数量", dataAttribute = "shfete_ability")
    private long newCount;
    @FieldTypeAnnotation(desc = "提升前境界", dataAttribute = "shfete_beftit")
    private int oldStateId;
    @FieldTypeAnnotation(desc = "提升后境界", dataAttribute = "shfete_afttit")
    private int newStateId;
    @FieldTypeAnnotation(desc = "更换法宝id", dataAttribute = "shfete_skillget")
    private int equipmentId;
    @FieldTypeAnnotation(desc = "法宝列表", saveJson = true)
    private List<FeastEquipmentData> equipmentDataList;

    @FieldTypeAnnotation(desc = "法宝列表", insert = false, dataAttribute = "shfete_aftskill")
    private List<Map<String, Object>> skillList;

    public LogFeastPowerVal(long userId, int activityId, int type, long changeCount, long newCount, int oldStateId, int newStateId, int equipmentId, List<FeastEquipmentData> equipmentDataList) {
        this.userId = userId;
        this.activityId = activityId;
        this.type = type;
        this.changeCount = changeCount;
        this.newCount = newCount;
        this.oldStateId = oldStateId;
        this.newStateId = newStateId;
        this.equipmentId = equipmentId;
        this.equipmentDataList = equipmentDataList;
    }

    @Override
    public long getUserId() {
        return userId;
    }

    public void setSkillList(List<Map<String, Object>> skillList) {
        this.skillList = skillList;
    }
}
